package com.tsxy.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author 飞
 * @since 2022-03-24
 */
@Getter
@Setter
  @ApiModel(value = "Order对象", description = "")
@TableName("`order`")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

      @ApiModelProperty("id")
        private String id;

      @ApiModelProperty("支付宝交易号id")
      @TableField(value = "ZFBId")
      private String zFBId;

      @ApiModelProperty("用户id")
      private Integer userId;

      @TableField(exist = false)
      private User user;

      @ApiModelProperty("地址id")
      private Integer addressId;

      @TableField(exist = false)
      private Address address;

      @ApiModelProperty("下单时间")
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
      @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      private LocalDateTime time;

      @ApiModelProperty("描述")
      private String express;

      @ApiModelProperty("状态")
      private Integer status;

      @TableField(exist = false)
      private List<OrderDetails> orderDetails;
}
